<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/4/19
  Time: 11:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../../common/web_top.jsp" %>

<title>合同管理</title>


<div ng-include="loanIng" class="includeStyle "><!--待前合同-->
    <div class="bgSortScroll">
        <!-- ngIf: HbHr.hr101 -->
        <div class="public-bgContent " ng-init="load()" ng-if="HbHr.hr101">
            <!--表单搜索-->
            <div class="public-bgDate">
                    <span><input type="text" autocomplete="off" id="start_time" ng-focus="remHight()" ng-class="{'error':redErr.dateTime}"
                                 placeholder="开始时间" ng-model="param.beginTime"
                                 class="ng-pristine ng-untouched ng-valid ng-empty datepicker"><i
                            class="iconfont icon-riqi"></i></span>
                <em>&nbsp;&nbsp;~&nbsp;&nbsp;</em>
                <span><input type="text" autocomplete="off" id="end_time" ng-focus="remHight()" ng-class="{'error':redErr.dateTime}"
                             placeholder="结束时间" ng-model="param.endTime"
                             class="ng-pristine ng-untouched ng-valid ng-empty datepicker"><i
                        class="iconfont icon-riqi"></i></span>
                <div class="se-re">
                    <select id="seleNames"
                            class="ng-pristine ng-untouched ng-valid ng-empty">
                        <option value="" selected="selected">选择字段</option>
                        <option value="1">借款编号</option>
                        <option value="2">客户姓名</option>
                        <option value="3">手机号码</option>
                        <option value="4">身份证号码</option>
                        <option value="5">业务员姓名</option>
                    </select>
                    <span class="se-po"></span>
                </div>
                <span>
			<input type="text" autocomplete="off" id="inputNames" placeholder="请输入关键字" ng-focus="remHight()" ng-model="param.keyword"
                   class="ng-pristine ng-untouched ng-valid ng-empty">
		</span>
                <div id="contract_head_date" style="display: inline-block"></div>
                <script type="x-handlebars-template" id="contract_head_date_tpl">
                <div class="se-re">
                    <select ng-options="a.id as a.atName for a in fenQi" ng-model="param.atId"
                            class="data_select ng-pristine ng-untouched ng-valid ng-empty">
                        <option value="" class="" selected="selected">分期</option>
                        {{#each content}}
                        <option label="{{atName}}" value="{{id}}">{{atName}}</option>
                        {{/each}}
                    </select>
                    <span class="se-po"></span>
                </div>
               </script>
                <div class="se-re">
                    <select id="loan_way_select" ng-model="param.loan_way" class="ng-pristine ng-untouched ng-valid ng-empty">
                        <option value="" selected="selected">贷款方式</option>
                    </select>
                    <script type="text/x-handlebars-template" id="loanMethod_list_tpl">
                        {{#each content}}
                        <option value="{{id}}">{{name}}</option>
                        {{/each}}
                    </script>
                    <span class="se-po"></span>
                </div>
                <div class="se-re">
                    <select id="product_choose_list" class="ng-pristine ng-untouched ng-valid ng-empty">
                        <option value="">选择产品</option>
                        <%--<option value="1">按揭短拆</option>
                        <option value="2">红本抵押</option>
                        <option value="3">红本质押</option>--%>
                    </select>
                    <span class="se-po"></span>
                </div>
                <button ng-click="btn(1)" class="serach_orderMortgageList">
                    <i class="iconfont icon-sousuo"></i>
                </button>
            </div>
            <!--提示操作-->

                <div class="public-bghint">
                    <span ng-click="show()" style="cursor: pointer;">提示操作</span>
                    <i class="iconfont icon-icon-copy-copy"></i>
                    <span class="calNum">筛选<span class="" id="total">0</span>条结果</span>
                </div>
                <ul class="public-ulList" ng-show="loanIngShow">
                    <li>显示拥有该栏目管理权限的数据；</li>
                    <li>拥有权限的管理员会显示对应的操作按钮；</li>
                    <li>显示所属分公司下的所有业务员的合同</li>
                </ul>
                <div style="height: 20px;"></div>
                <div class="table-scroll">
                    <!--tabel 列表-->
                    <table class="table public-table PoInput">
                        <thead>
                        <tr>
                            <td>选择</td>
                            <td>创单时间</td>
                            <td>借款编号</td>
                            <td>所属产品</td>
                            <td>客户姓名</td>
                            <td>期限</td>
                            <td>借款金额</td>
                            <td>合同编号</td>
                            <td>业务员</td>
                            <td>部门</td>
                            <td>状态</td>
                            <td>操作</td>
                        </tr>
                        </thead>
                        <tbody id="contract_management">

                        </tbody>

                        <tfoot class="public-botPage">
                        <tr>
                            <td>
                                <!-- 全选反选  -->
                                <input class="all_check" style=" " type="checkbox"
                                       ng-click="F.ch_id_all($event,'ch_id')">
                            </td>
                            <td colspan="12">
                                <div class="public-botPage-left">
							<span>
								<span>全选</span>
							</span>
                                    <div class="se-re">
                                        <select id="allDown_select" class="tabHint mng ng-pristine ng-untouched ng-valid ng-not-empty"
                                                ng-model="selectType.default" ng-change="F.selectQuery('mng','ch_id')">
                                            <option value="-1" selected="selected">批量操作</option>
                                            <!-- ngIf: HbHr.hr104 -->
                                            <option ng-if="HbHr.hr104" value="恢复订单" path="loanIng" data-type="4"
                                                    params="blankLoad" class="">恢复订单
                                            </option><!-- end ngIf: HbHr.hr104 -->
                                        </select>
                                        <span class="se-po"></span>
                                    </div>
                                </div>
                                <div class="page-container public-botPage-right">
                                    <!-- 页码公共引进  'work/tems3/loanBefore/page/page.html'-->

                                </div>
                            </td>
                        </tr>
                        </tfoot>
                    </table>
                </div>

            <!--底部操作-->
        </div><!-- end ngIf: HbHr.hr101 -->
    </div>
</div>
<%--付款对象--%>
<div class="winBox pay_object_winBox" style="display: none;">
    <!-- 加载弹窗盒子容器 -->
    <!-- ngInclude: box -->
    <div class="winBox1 " ng-include="box"><!-- 说明：弹窗 -->
        <div class="winBox2 ">
            <div class="payer">

                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">付款对象</span>
                    <i class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
                </div>
                <div class="resultBox">
                    <div class="centerBox">
                        <div class="resultPadd">
                            <div class="deleteTit">
                                <span class="first"><i class="iconfont icon-tips2"></i></span>
                                <span>您确定要更换付款对象？</span>
                            </div>
                            <div class="tdRadio">
                                <input type="radio" name="briskResult" ng-model="param.payment_object " value="1"
                                       class="ng-pristine ng-untouched ng-valid ng-not-empty">不更换，还是客户
                                <input type="radio" name="briskResult" ng-model="param.payment_object " value="2"
                                       class="ng-pristine ng-untouched ng-valid ng-not-empty">更换，选择第三方
                            </div>
                            <!-- tab列表结束 -->
                            <!-- 底部 -->
                            <div class="deleFooter">
                                <div class="beizhu assBeizhu"><span>*</span>备注</div>
                                <textarea ng-focus="remHight()" ng-class="{'error':redErr.remarks}"
                                          ng-model="param.remarks" data-tag="textLength" showtag="zishuxians"
                                ></textarea>
                                <div class="deleBtn">
                                    <button style="background: #E55A5B;" ng-click="queding()">确定提交</button>
                                </div>
                            </div>
                        </div>


                    </div>
                </div>


            </div>
        </div>
    </div>
</div>
<%--修改收款--%>
<div class="winBox modify_money_winBox" style="display: none;">
    <!-- 加载弹窗盒子容器 -->
    <!-- ngInclude: box -->
    <div class="winBox1 " ng-include="box"><!-- 说明：弹窗 -->
        <div class="winBox2 ">
            <div class="putloan">
                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">修改收款账号</span>
                    <i class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
                </div>
                <div class="resultBox">
                    <div class="centerBox">
                        <div class="resultPadd">
                            <table class="resultTab" style="margin-top: 20px;">
                                <tbody>
                                <!--收款账号 -->
                                <tr>
                                    <td>收款人</td>
                                    <td class="tdWei">
                                        <label style="width: 300px;">
                                            <input style="width: 295px;" type="text" autocomplete="off" ng-model="param.payee"
                                                   class="ng-pristine ng-untouched ng-valid ng-empty">
                                        </label>
                                    </td>
                                </tr>
                                <!--收款账号 -->
                                <tr>
                                    <td>收款账号</td>
                                    <td class="tdWei">
                                        <label style="width: 300px;">
                                            <input style="width: 295px;" type="text" autocomplete="off" ng-model="param.account"
                                                   class="ng-pristine ng-untouched ng-valid ng-empty">
                                        </label>
                                    </td>
                                </tr>

                                <!--收款银行 -->
                                <tr>
                                    <td>收款银行</td>
                                    <td class="tdWei">
                                        <label style="width: 300px;">
                                            <input style="width: 295px;" type="text" autocomplete="off" ng-model="param.bank"
                                                   class="ng-pristine ng-untouched ng-valid ng-empty">
                                        </label>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <!-- 底部 -->
                            <div class="deleFooter">
                                <div class="deleBtn">
                                    <button style="background: #E55A5B;" ng-click="btn()">确定提交</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<%--合同待定--%>
<div class="winBox determineWinbox" style="display: none;">
    <!-- 加载弹窗盒子容器 -->
    <!-- ngInclude: box --><div class="winBox1 " ng-include="box"><!-- 说明：提交评审弹窗 -->
    <div class="winBox5 ">
        <div>
            <div class="headerBox">
                <!-- ngIf: recheckLoan==2 --><span class="headerSpan " ng-if="recheckLoan==2">确认待签</span><!-- end ngIf: recheckLoan==2 -->
                <!-- ngIf: recheckLoan==1 -->
                <!-- ngIf: recheckLoan==3 -->
                <i class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
            </div>
            <!-- 内容 -->
            <div class="deleBox">
                <!-- 底部 -->
                <div class="deleteTit">
                    <span class="first"><i class="iconfont icon-tips2"></i></span>
                    <!-- ngIf: recheckLoan==1 || recheckLoan==2 --><span ng-if="recheckLoan==1 || recheckLoan==2" class="">您确定转合同待签？</span><!-- end ngIf: recheckLoan==1 || recheckLoan==2 -->
                    <!-- ngIf: recheckLoan==3 -->
                </div>
                <div class="deleFooter" style="padding: 0;">
                    <div class="deleBtn">
                        <button id="determineBtn" ng-click="btn()" style="margin: 0;margin-bottom: 30px;margin-left: 68px;">确认提交</button>
                    </div>
                </div>
            </div>
        </div>
    </div></div>
</div>

<div class="winBox cover_winBox">
    <!-- 加载弹窗盒子容器 -->
    <!-- ngInclude: box -->
    <div class="winBox1 " ng-include="box"><!-- 说明： 选择已有客户 -->
        <div class="winBox3 ">
            <div class="deleteBox">
                <!-- 头部 -->
                <div class="headerBox">
                    <span class="headerSpan">恢复申请</span>
                    <i class="iconfont icon-wrong headerIcon" ng-click="F.showWin('hide')"></i>
                </div>
                <!-- 内容 -->
                <div class="deleBox">
                    <!-- 中间列表 -->
                    <div class="deleteTit">
			<span class="first">
				<i class="iconfont icon-tips2"></i>
			</span>
                        <span>您确定要恢复？</span>
                    </div>
                    <div class="beizhu"><span>*</span>备注</div>
                    <textarea class='coverRemarks' ng-focus="remHight()" ng-class="{'error':redErr.remarks}" data-tag="textLength" showtag="zishuxians"  ng-model="reason" class="ng-pristine ng-valid ng-empty ng-valid-maxlength ng-touched"></textarea>
                    <!-- 底部 -->
                    <div class="deleFooter">
                        <div class="deleBtn">
                            <button class="sureCover">确定恢复</button>
                            <button class="canCover">取消恢复</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="x-handlebars-template" id="contract_management_tpl">

    {{#if content.content.list}}
    {{#each content.content.list}}

    <tr ng-repeat="i in data.content.list" ng-click="F.tabClick($event)"
        class="table-tr-hover ">
        <td><input type="checkbox" name="ch_id" value="{{id}}"></td>
        <td class="">{{found_time}}</td>
        <td class="">{{loan_number}}</td>
        <td class="">{{product_name}}</td>
        <td class="">{{personal_name}}</td>
        <td class="">{{#IF_EQ repayment_way '4'}}{{at_id}}天{{else}}{{term}}{{/IF_EQ}}</td>
        <td class="">￥{{#thounsandBit apply_money}}{{/thounsandBit}}</td>
        <td class="yellowBg"><span class="">
                                    {{#if contract_no}}
                                    {{contract_no}}
                                    {{else}}
                                    --
                                    {{/if}}
                                </span></td>
        <td class="">{{admin_name}}</td>
        <td class="">
            {{#if d1_name}}
            {{#if d3_name}}{{d3_name}}&gt;&nbsp;{{/if}}{{#if d2_name}}{{d2_name}}&gt;&nbsp;{{/if}}{{#if
            d1_name}}{{d1_name}}{{/if}}
            {{/if}}
        </td>
        <td class="">{{s_name}}</td>
        <td class="big-last-td">
            <div class="se-re sel-blue">
                <select ng-click="F.stopPropagation($event)"
                        data-id="{{id}}" data-oid="{{id}}" data-productid="{{product_id}}"
                        data-taskid="{{task_id}}" data-nodeid="{{node_id}}"
                        class="operation_list tabHint tt683 ng-not-empty"
                        ng-model="selectType.default" ng-change="F.selectQuery('tt683')">
                    <option value="-1" selected="selected">选择操作</option>
                    {{#each ../fourthMenus}}
                    <!-- ngIf: HbHr.hr102 -->
                    <option value="{{key}}">{{name}}</option>
                    {{/each}}
                    <!-- ngIf: HbHr.hr103 -->
                </select>
                <span class="se-po-blue"></span>
            </div>
            <!-- ngIf: HbHr.hr249 -->
            <button class="tabHint btnQuery683 operations_record"
                    ng-click="F.btnQuery('btnQuery'+i.id);$event.stopPropagation();"
                    path="loanBefore" params="record" param="Table:t_order,tableId:683"
                    ng-if="HbHr.hr249" id="{{id}}">
                操作记录
            </button><!-- end ngIf: HbHr.hr249 -->
        </td>
    </tr>
    {{/each}}
    {{else}}
    <tr ng-if="data.content.list.length ==0" class="">
        <td colspan="16">暂时找不到数据</td>
    </tr>
    {{/if}}
</script>
<script type="text/javascript" src="static/js/page/loanIng/contract_waiting.js?_v=190102162154"></script>
<script type="text/javascript" src="static/js/jquery-plugin/jpager.js?_v=190102162154"></script>

<%@ include file="../../common/web_bottom.jsp" %>
